/**
 * Copyright 2016-2018 mobaas.com
 */
package com.mobaas.devops.dao.mybatis;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.mobaas.devops.dao.VcsStatDao;
import com.mobaas.devops.model.VcsDayStat;
import com.mobaas.devops.model.VcsMonthStat;

/**
 * 
 * @author billy zhang
 * 
 */
@Mapper
public interface VcsStatMapper extends VcsStatDao {


	@Override
	List<String> selectVcsUserList(
			@Param("beginDate")Date beginDate,
			@Param("endDate")Date endDate);

	@Override
	List<VcsDayStat> selectDayStatList(
			@Param("beginDate")Date beginDate,
			@Param("endDate")Date endDate);

	@Override
	List<VcsDayStat> selectDayStatListByUser(
			@Param("user")String user,
			@Param("beginDate")Date beginDate,
			@Param("endDate")Date endDate);

	@Override
	List<VcsDayStat> selectDayStatListForDayMax(
			@Param("beginDate")Date beginDate,
			@Param("endDate")Date endDate);

	@Override
	List<VcsMonthStat> selectMonthStatList(
			@Param("limit")int limit);

	@Override
	void insertDayStat(VcsDayStat stats);

	@Override
	int updateDayStat(VcsDayStat stats);

	@Override
	VcsDayStat selectDayStatByUserAndDate(
			@Param("user")String user, 
			@Param("date")Date date);

	@Override
	VcsMonthStat selectMonthStatByUserAndMonth(
			@Param("user")String user, 
			@Param("month")String month);

	@Override
	void insertMonthStat(VcsMonthStat stats);

	@Override
	int updateMonthStat(VcsMonthStat stats);

	@Override
	List<VcsDayStat> selectDayStatListByDate(
			@Param("date")Date date);

	@Override
	List<VcsMonthStat> selectMonthStatListByMonth(
			@Param("month")String month);
	
}